package homework;

public class Day05Extended {
    public static void main(String[] args) {
        /*
        //1)
        int sum=0;
        for(int num=2;num<101;num+=2){
            sum+=num;
        }
        System.out.println("和是"+sum);
        //2)
        int s=1;
        for(int i=1;i<9;i++){
             s=s*i;
        }
        System.out.println("8的阶乘"+s);
        */

        for(int i=1;i<=6;i++){
            for(int k=1;k<=2*i-1;k++){
                System.out.print("*");
            }
            System.out.println();
        }


        int[] arr = new int[10];
        for(int i=0;i<arr.length;i++){
            arr[i]=(int)(Math.random()*100);
            System.out.println(arr[i]);
        }
        int max = arr[0];
        int min = arr[0];
        for(int i=1;i<arr.length;i++){
            if(arr[i]>max){
                max=arr[i];
            }
            if(arr[i]<min){
                min=arr[i];
            }
        }
        System.out.println("max:"+max+" min:"+min);

    }
}
